/**
 @Author Zhenglinbin
 @Date 2021/7/28
 **/
export default {
    commit: {
        mounted: (el: Element, bind: any) => {
            el.addEventListener("click", event => {
                event.preventDefault()
                listener(el,bind)
            });
        }
    }
}
function listener(el: Element, bind: any) {
    el.classList.add('ant-btn-loading')
    const time = bind.value && typeof 'Number' ? Number.parseInt(bind.value) : 2500;

    setTimeout(() => {
        el.classList.remove('ant-btn-loading')
    }, time)
}
